package com.aauedu.springboot.exception;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/*@Slf4j
//@ControllerAdvice
public class GlobalExceptionController {
    //算术异常，空指针异常
    @ExceptionHandler({ArithmeticException.class, NullPointerException.class})
    public String exceptionHandler(Exception e, Model model) {
        log.error("异常信息:{}", e.getMessage());
        model.addAttribute("message", e.getMessage());
        return "error/global";
    }
}*/
